<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>人员详细信息</title>
    <!-- Bootstrap -->
    <link href="../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div class="container">
    <form class="form-inline" action="/person_update_after" method="post">
        <nav th:replace="~{system/sys/sys_topbar::top}"></nav>
        <input type="hidden" name="page" th:value="${page}">
        <input type="hidden" name="personId" th:value="${personInfo.personId}">
        <div class="container" style="padding-top: 20px">
            <div class="row form-group" style="padding-left: 20rem">
                <input type="hidden" name="person_id" th:value="${personInfo.personId}">
                <label for="personAccount" style="padding-right: 30px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    账号
                </label>
                <input readonly="readonly" th:value="${personInfo.personAccount}" type="text" name="personAccount" class="form-control" id="personAccount" placeholder="请输入账号" style="width: 50rem">
                <span class="label label-warning">账号不可修改</span>
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label style="padding-right: 30px; display:inline;font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    状态
                </label>
                <select style="width: 50rem; height: 34px; border-radius: 4px; border: 1px solid #b6bec5" name="status">
                    <option th:selected="${personInfo.status eq '在职'}"  value="在职" >在职</option>
                    <option th:selected="${personInfo.status eq '休假'}"  value="休假" >休假</option>
                    <option th:selected="${personInfo.status eq '离退'}"  value="在职" >离退</option>
                </select>
                <!--<input th:value="${personInfo.status}" type="text" name="status" class="form-control" id="status" placeholder="请输入状态" style="width: 50rem">-->
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="personName" style="padding-right: 30px; display:inline;font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    姓名
                </label>
                <input th:value="${personInfo.personName}" type="text" name="personName" class="form-control" id="personName" placeholder="请输入姓名" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label style="padding-right: 30px; display:inline;font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    性别
                </label>
                <select style="width: 50rem; height: 34px; border-radius: 4px; border: 1px solid #b6bec5" name="sex">
                    <option th:selected="${personInfo.sex eq 0}"  value=0 >男</option>
                    <option th:selected="${personInfo.sex eq 1}"  value=1 >女</option>
                </select>
                <!--<input th:if="${personInfo.sex eq 0}" th:value="男" type="text" name="sex" class="form-control" id="sexMan" placeholder="请输入性别" style="width: 50rem">-->
                <!--<input th:if="${personInfo.sex eq 1}" th:value="女" type="text" name="sex" class="form-control" id="sexFemale" placeholder="请输入性别" style="width: 50rem">-->
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="phoneNumber" style="padding-right: 30px; display:inline;font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    手机
                </label>
                <input th:value="${personInfo.phoneNumber}" type="text" name="phoneNumber" class="form-control" id="phoneNumber" placeholder="请输入手机" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="address" style="padding-right: 30px; display:inline;font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    住址
                </label>
                <input th:value="${personInfo.address}" type="text" name="address" class="form-control" id="address" placeholder="请输入住址" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="belongedCompany" style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    所属单位
                </label>
                <input th:value="${personInfo.belongedCompany}" type="text" name="belongedCompany" class="form-control" id="belongedCompany" placeholder="请输入所属单位" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="idCard" style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    身份证号
                </label>
                <input th:value="${personInfo.idCard}" type="text" name="idCard" class="form-control" id="idCard" placeholder="请输入身份证号" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="bankNumber" style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    银行账号
                </label>
                <input th:value="${personInfo.bankNumber}" type="text" name="bankNumber" class="form-control" id="bankNumber" placeholder="请输入银行账号" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="born" style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    出生日期
                </label>
                <input th:value="${personInfo.born}" type="text" name="born" class="form-control" id="born" placeholder="请输入出生日期" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="education" style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    文化程度
                </label>
                <input th:value="${personInfo.education}" type="text" name="education" class="form-control" id="education" placeholder="请输入文化程度" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    政治面貌
                </label>
                <select style="width: 50rem; height: 34px; border-radius: 4px; border: 1px solid #b6bec5" name="political">
                    <option th:selected="${personInfo.political eq '中共党员'}"  value="中共党员" >中共党员</option>
                    <option th:selected="${personInfo.political eq '中共预备党员'}"  value="中共预备党员" >中共预备党员</option>
                    <option th:selected="${personInfo.political eq '共青团员'}"  value="共青团员" >共青团员</option>
                    <option th:selected="${personInfo.political eq '民革党员'}"  value="民革党员" >民革党员</option>
                    <option th:selected="${personInfo.political eq '民盟盟员'}"  value="民盟盟员" >民盟盟员</option>
                    <option th:selected="${personInfo.political eq '民建会员'}"  value="民建会员" >民建会员</option>
                    <option th:selected="${personInfo.political eq '民进会员'}"  value="民进会员" >民进会员</option>
                    <option th:selected="${personInfo.political eq '农工党党员'}"  value="农工党党员" >农工党党员</option>
                    <option th:selected="${personInfo.political eq '致公党党员'}"  value="致公党党员" >致公党党员</option>
                    <option th:selected="${personInfo.political eq '九三学社社员'}"  value="九三学社社员" >九三学社社员</option>
                    <option th:selected="${personInfo.political eq '台盟盟员'}"  value="台盟盟员" >台盟盟员</option>
                    <option th:selected="${personInfo.political eq '无党派人士'}"  value="无党派人士" >无党派人士</option>
                    <option th:selected="${personInfo.political eq '群众'}"  value="群众" >群众</option>
                </select>
                <!--<input th:value="${personInfo.political}" type="text" name="political" class="form-control" id="political" placeholder="请输入政治面貌" style="width: 50rem">-->
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="property" style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    职工性质
                </label>
                <input th:value="${personInfo.property}" type="text" name="property" class="form-control" id="property" placeholder="请输入职工性质" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    用工性质
                </label>
                <select style="width: 50rem; height: 34px; border-radius: 4px; border: 1px solid #b6bec5" name="character">
                    <option th:selected="${personInfo.character eq '正式工'}"  value="正式工" >正式工</option>
                    <option th:selected="${personInfo.character eq '临时工'}"  value="临时工" >临时工</option>
                    <option th:selected="${personInfo.character eq '实习生'}"  value="实习生" >实习生</option>
                </select>
                <!--<input th:value="${personInfo.character}" type="text" name="character" class="form-control" id="character" placeholder="请输入用工性质" style="width: 50rem">-->
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
            <div class="row form-group" style="padding-left: 20rem">
                <label for="workDate" style="padding-right: 18px; font-weight: bold; font-family: 'Hiragino Sans GB', 'Microsoft Yahei UI', 'Microsoft Yahei', 微软雅黑, 'Segoe UI', Tahoma, 宋体b8b体, SimSun, sans-serif;">
                    入职时间
                </label>
                <input th:value="${personInfo.workDate}" type="text" name="workDate" class="form-control" id="workDate" placeholder="请输入入职时间" style="width: 50rem">
            </div>
            <div class="row" style=" padding-top: 20px;padding-bottom: 20px"><hr style="background-color: aliceblue; height: 2px; margin: unset; border: unset"></div>
        </div>
        <div class="container">
            <div class="row text-center">
                <button type="submit" class="btn btn-primary" style="margin-right: 50px; width: 90px; margin-bottom: 40px">确认修改</button>
                <a th:href="@{/person_manage}"><button type="button" class="btn btn-primary" style="margin-right: 50px; width: 90px; margin-bottom: 40px">返回</button></a>
            </div>
        </div>

    </form>
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="../jquery-3.3.1.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script>
    var p = document.getElementById('pStatus');
    function working() {
        // alert(p.innerText)
        p.innerText="在职";
    }
    function vacation() {
        p.innerText="休假";
    }
    function living() {
        p.innerText="离退";
    }
    var pSexMan = document.getElementById('pSexMan');
    var pSexFemale = document.getElementById('pSexFemale');
    function man() {
        if (pSexMan == null){
            pSexFemale.innerText = "男";
        }
        else if (pSexMan != null){
            pSexMan.innerText = "男";
        }
    }
    function female() {
        if (pSexFemale == null){
            pSexMan.innerText = "女";
        }
        else if (pSexFemale != null){
            pSexFemale.innerText = "女";
        }
    }
    var pPolitical = document.getElementById('pPolitical');
    var selectPolitical = document.getElementsByName('political1');
    function political1(obj) {
        pPolitical.innerText = $(obj).text();
    }

    var pCharacter = document.getElementById('pCharacter');
    function character1(obj) {
        pCharacter.innerText = $(obj).text();
    }


</script>
</body>
</html>